<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>明星资料卡案例</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        img{
            display: block;
        }
        .box{
            width: 350px;
            /* border: 5px solid red; */
            margin: 0 auto;
            position: relative;
            overflow: hidden;
        }
        .box img{
            width: 100%;
            transition: all 1s;
        }
        .box:hover img{
            transform: translateX(50px);
            opacity: 0.5;
        }
        .box h2{
            position: absolute;
            left: 50px;
            top: 25px;
            color: white;
            transition: all 1.5s 0.5s;
        }
        .box:hover h2{
            /* left: 100px; */
            /* 该left不建议用在动画上 */
            transform: translateX(100px);
        }
        .box p{
            position: absolute;
            left: 50px;
            width: 100px;
            color: white;
            background: darkblue;
            transition: all 0.5s;
        }

        .box .p1{
            top: 110px;
            transform: translateY(400px);
        }
        .box:hover .p1{
            transform: translateY(0px);
        }
        .box .p2{
            top: 210px;
            transform:translateX(500px)
        }
        .box:hover .p2{
            transform:translateX(0px)
        }
        .box .p3{
            top: 300px;
            transform:translateX(-500px)
        }
        .box:hover .p3{
            transform:translateX(0px)
        }
    </style>
</head>
<body>
    <div class="box">
        <img src="img3/1.png" alt="">
        <h2>title</h2>
        <p class="p1">1111</p>
        <p class="p2">2222</p>
        <p class="p3">3333</p>
    </div>
</body>
</html>